package com.ssy.lingxi.order.model.vo.mobile.response;

import com.ssy.lingxi.order.model.dto.MobileOrderProductQueryDTO;
import com.ssy.lingxi.order.utils.NumberUtil;

import java.io.Serializable;

/**
 * App - 分页查询订单列表时的订单商品信息
 * @author 万宁
 * @version 2.0.0
 * @date 2021-09-22
 */
public class MobileOrderProductQueryVO implements Serializable {
    private static final long serialVersionUID = 7590954480655366401L;

    public MobileOrderProductQueryVO() {
    }

    public MobileOrderProductQueryVO(MobileOrderProductQueryDTO query) {
        this.orderProductId = query.getOrderProductId();
        this.productId = query.getProductId();
        this.skuId = query.getSkuId();
        this.stockId = query.getStockId();
        this.logo = query.getLogo();
        this.priceType = query.getPriceType();
        this.name = query.getName();
        this.category = query.getCategory();
        this.brand = query.getBrand();
        this.spec = query.getSpec();
        this.unit = query.getUnit();
        this.quantity = NumberUtil.formatToInteger(query.getQuantity());
        this.refPrice = NumberUtil.formatAmount(query.getRefPrice());
        this.deliverType = query.getDeliverType();
        this.deliverTypeName = query.getDeliverTypeName();
        this.address = query.getAddress();
        this.receiver = query.getReceiver();
        this.phone = query.getPhone();
    }

    /**
     * 订单商品Id(订单服务生成的，只能用于订单服务其他接口的调用)
     */
    private Long orderProductId;

    /**
     * 商品Id
     */
    private Long productId;

    /**
     * 商品SkuId
     */
    private Long skuId;

    /**
     * 渠道商品SkuId
     */
    private Long stockId;

    /**
     * 商品价格类型，1-现货价格，2-询价价格，3-积分兑换，4-赠品
     */
    private Integer priceType;

    /**
     * 商品Logo
     */
    private String logo;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品类别
     */
    private String category;

    /**
     * 商品品牌
     */
    private String brand;

    /**
     * 商品规格
     */
    private String spec;

    /**
     * 计价单位
     */
    private String unit;

    /**
     * 购买数量
     */
    private String quantity;

    /**
     * 商品到手价
     */
    private String refPrice;

    /**
     * 配送方式枚举
     */
    private Integer deliverType;

    /**
     * 配送方式名称
     */
    private String deliverTypeName;

    /**
     * 自提地址（如配送方式为自提）
     */
    private String address;

    /**
     * 接收人（如配送方式为自提）
     */
    private String receiver;

    /**
     * 接收人电话（如配送方式为自提）
     */
    private String phone;

    public Long getOrderProductId() {
        return orderProductId;
    }

    public void setOrderProductId(Long orderProductId) {
        this.orderProductId = orderProductId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getStockId() {
        return stockId;
    }

    public void setStockId(Long stockId) {
        this.stockId = stockId;
    }

    public Integer getPriceType() {
        return priceType;
    }

    public void setPriceType(Integer priceType) {
        this.priceType = priceType;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getQuantity() {
        return quantity;
    }

    public void setQuantity(String quantity) {
        this.quantity = quantity;
    }

    public String getRefPrice() {
        return refPrice;
    }

    public void setRefPrice(String refPrice) {
        this.refPrice = refPrice;
    }

    public Integer getDeliverType() {
        return deliverType;
    }

    public void setDeliverType(Integer deliverType) {
        this.deliverType = deliverType;
    }

    public String getDeliverTypeName() {
        return deliverTypeName;
    }

    public void setDeliverTypeName(String deliverTypeName) {
        this.deliverTypeName = deliverTypeName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
